mwifiex: Fix possible buffer overflows at parsing bss descriptor
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 May 2019 12:52:19 +0000 (14:52 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
commit673b8e944aec1fd2789bdbdec05eaf21d8f99378
tree81c8f2fa5ac84aa6cb4f5c814f58a53cff0d2d11
parent5c054eb6995316c98641a60e7872258bee638dc2
mwifiex: Fix possible buffer overflows at parsing bss descriptor

mwifiex_update_bss_desc_with_ie() calls memcpy() unconditionally in
a couple places without checking the destination size.  Since the
source is given from user-space, this may trigger a heap buffer
overflow.

Fix it by putting the length check before performing memcpy().

This fix addresses CVE-2019-3846.

Reported-by: huangwen <huangwen@venustech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name mwifiex-fix-possible-buffer-overflows-at-parsing-bss.patch
drivers/net/wireless/marvell/mwifiex/scan.c